<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<style>
 .order_detail tbody tr{border-top: 1px dotted;}
 .order_detail tr td,.order_detail tr th{padding: 10px;;text-align: center;}
</style>
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-userOrder-edit" th:object="${order}">
        <input id="orderId" name="orderId" th:field="*{orderId}"  type="hidden">
        <div class="form-group" style="background: #eeeeee;">
            <h3>订单信息</h3>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">状态：</label>
            <div class="col-sm-3">
                <label class="control-label" th:text="*{status}" id="status"></label>
            </div>
            <label class="col-sm-2 control-label">时间：</label>
            <div class="col-sm-4">
                <label class="control-label" th:text="*{createTime}"></label>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-12">
                <table class="order_detail" style="width: 100%;">
                    <thead>
                        <tr>
                            <th width="40%">餐饮</th>
                            <th width="20%">原料</th>
                            <th width="15%">价格</th>
                            <th width="15%">数量</th>
                        </tr>
                    </thead>
                    <tbody>
                    <tr th:each="detail,indexState:${order.details}">
                        <td><img th:src="${detail.imgUrl}" style="width: 80px;height: 80px;float: left;"><span class="leave_out2" th:text="${detail.goodsName}"></span></td>
                        <td th:text="${detail.attr1}"></td>
                        <td th:text="${detail.goodsPrice}"></td>
                        <td th:text="${detail.goodsNum}"></td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">备注：</label>
            <div class="col-sm-9">
                <label class="control-label" th:text="*{remark}" ></label>
            </div>
        </div>
        <div class="form-group">
            <h3 style="text-align: right;color: red;" th:text="*{'总价：'+totalPrice+'元'}"></h3>
        </div>
        <div class="form-group" style="background: #eeeeee;">
            <h3>收货与物流信息</h3>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">收货信息：</label>
            <div class="col-sm-7">
                <label class="control-label" th:text="*{receiveAddr}"></label>
            </div>
            <div class="col-sm-3">
                <label class="control-label" th:text="*{receiveUser+'(收)/'+receiveTel}"></label>
            </div>
        </div>
        <div class="form-group" th:if="*{courierNumber!=null}">
            <label class="col-sm-2 control-label">配送人信息：</label>
            <div class="col-sm-9">
                <label class="control-label" th:text="*{courierNumber}"></label>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script th:inline="javascript">
    var datas = [[${@dict.getType('sys_order_status')}]];
    $("#status").html($.table.selectDictLabel(datas, $("#status").text()))
</script>
</body>
</html>
